import VueRouter from "vue-router";
import Vue from "vue";
import updateUserManager from "@/page/dialog/updateUserManager.vue";
import addRoleManager from "@/page/dialog/addRoleManager.vue";
import logManager from "@/page/log/logManager.vue";

Vue.use(VueRouter)

// vue-router路由配置
const login = () => import('@/page/login/login.vue')
const error = () => import('@/page/error/error.vue')

//管理员
const index = () => import('@/page/index/index.vue')
const home = () => import('@/page/home/home.vue')
const menu = () => import('@/page/menu/menu.vue')
const user = () => import('@/page/user/user.vue')
const role = () => import('@/page/user/role.vue')
const org = () => import('@/page/user/org.vue')
const paramConfig = () => import('@/page/system/paramConfig.vue')
const hunanshengIndex1 = () => import('@/page/map/index1.vue')


const list1 = () => import('@/page/list/list1.vue')
const list2 = () => import('@/page/list/list2.vue')
const list3 = () => import('@/page/list/list3.vue')
const list4 = () => import('@/page/list/list4.vue')




const adminBaseView = () => import('@/components/admin-base.vue')
// const rightContent = () => import('@/components/admin-right.vue')

const routes = [
    {
        path: '',
        component: login,
        redirect: '/login'
    },
    {
        path: '/user',
        component: adminBaseView,
        children: [
            {
                path: '',
                component: user
            },
            {
                path: '/user',
                component: user
            },
            {
                path: '/updateUserManager',
                component: updateUserManager
            },
            {
                path: '/role',
                component: role
            },
            {
                path: '/addRoleManager',
                component: addRoleManager
            },
            {
                path: '/logManager',
                component: logManager
            },
            {
                path: '/org',
                component: org
            },
            {
                path: '/paramConfig',
                component: paramConfig
            },
            {
                path: '/list1',
                component: list1
            },
            {
                path: '/list2',
                component: list2
            },
            {
                path: '/list3',
                component: list3
            },
            {
                path: '/list4',
                component: list4
            }
        ]
    },
    {
        path: '/login',
        component: login
    }, {
        path: '/error',
        component: error
    }, {
        path: '/home',
        component: home
    }, {
        path: '/menu',
        component: menu
    }

]


const router = new VueRouter({
    routes
})

export default router;